.ui.grid
  .six.wide.column
  .four.wide.column
    .ui.form
      #user-edit-errors
        = render 'shared/error_messages', object: @user
      = form_for @user, remote: true do |f|
        .ui.center.aligned.field.basic.segment
          = image_tag(current_user.avatar_url(:large), class: "ui image circular thumb user-avatar user-avatar-upload run-popup", data: { content: "#{t('.upload_avatar')}", position: "top center" })
          = f.file_field :avatar, class: "upload-avatar"
        .inline.fields.ui.center.aligned.basic.segment
          - I18n.available_locales.each do |locale|
            .field
              .ui.radio.checkbox.checked
                = f.radio_button(:locale, "#{locale}")
                = f.label t("locales.#{locale}")
        .field
          = f.text_field :email, placeholder: "#{t('activerecord.attributes.user.email')}", disabled: "disabled"
        .field
          = f.text_field :bio, placeholder: "#{t('activerecord.attributes.user.bio')}"
        .ui.buttons.session-buttons
          = link_to "#{t('.my_page')}", user_path(@user), class: "ui button orange"
          .or
          = f.submit "#{t('form.save')}", class: "ui blue button"